home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
476-500
/
disk_499
/
diglib
/
diglib.lzh
/
source
/
GSCRSR.for
< prev
next >
Wrap
Text File
|
1991-05-01
|
1KB
|
45 lines
SUBROUTINE GSCRSR(X,Y,IBUTN,IERR)
IMPLICIT NONE
C
C THIS DIGLIB SUBROUTINE TRIES TO GET GRAPHIC INPUT FROM
C THE CURRENTLY SELECTED DEVICE. IF THE DEVICE IS NOT CAPABLE
C OF IT, IERR=-1, ELSE IERR=0 AND:
C X = X POSITION OF CURSOR IN VIRTUAL COORDINATES
C Y = Y POSITION OF CURSOR IN VIRTUAL COORDINATES
C IBUTN = NEW BUTTON STATE
C
REAL*4 X,Y,DUMMY
INTEGER IBUTN,IERR
INTEGER*1 IAND
INCLUDE DIGLIB$KOM:GCDCHR.PRM
INCLUDE DIGLIB$KOM:GCDPRM.PRM
REAL*4 ARRAY(3)
C
C SEE IF DEVICE SUPPORTS CURSOR
C
IF (IAND(IDVBTS,1024) .EQ. 0) GO TO 900
C
C NOW ASK FOR CURSOR FROM DEVICE DRIVER
C
CALL GSDRVR(12,ARRAY,DUMMY)
C
C CONVERT ABSOLUTE CM. COORD. TO VIRTUAL COORDINATES
C
CALL GSIRST(ARRAY(2),ARRAY(3),X,Y)
C
C GET BUTTON STATE
C
IBUTN = ARRAY(1)
120 CONTINUE
IERR = 0
RETURN
C
C DEVICE DOESN'T SUPPORT GIN
C
900 IERR = -1
RETURN
END